/**
 * Created by x14941 on 2017/7/31.
 */
function IEVersion () {
    const userAgent = navigator.userAgent //取得浏览器的userAgent字符串
    const isIE = userAgent.indexOf('compatible') > -1 && userAgent.indexOf('MSIE') > -1 //判断是否IE<11浏览器
    const isEdge = userAgent.indexOf('Edge') > -1 && !isIE //判断是否IE的Edge浏览器
    const isIE11 = userAgent.indexOf('Trident') > -1 && userAgent.indexOf('rv:11.0') > -1
    if (isIE) {
        return 1
    } else if (isEdge) {
        return 'edge'//edge
    } else if (isIE11) {
        return 11 //IE11
    } else {
        return -1//不是ie浏览器
    }
}
function isShowVideo () {
    if (IEVersion() !== -1) {
        return [{
            title: '实时视频',
            href: '/video',
        }]
    }
    else {
        // return []
    }

    // if (IEVersion() !== -1) {
    //     return [{
    //         title: '实时视频',
    //         href: '/video',
    //     }]
    // }
    // else {
    //     return []
    // }

    return [{
        title: '实时视频',
        href: '/video-box',
    }]

}
export default [
    {
        title: '交付管理',
        href: '/pay',
        subMenu: [
            {
                title: '交付概况',
                href: '/pay',
            },
            {
                title: '理货进度',
                href: '/tallying',
            },

            {
                title: '订单查询',
                href: '/order',
            },
            {
                title: '交付指标',
                href: '/pay-quota',
            }
        ],
    },
    {
        title: '生产管理',
        href: '/company',
        subMenu: [
            {
                title: '成品满足率',
                href: '/product',
            },
            {
                title: '排产计划',
                href: '/scheduling',
            },
            {
                title: '库存概况',
                href: '/stock',
            },
            ...isShowVideo()
        ],
    },
    {
        title: '质量工艺管理',
        href: '/technique-index',
        subMenu: [
            {
                title: '工艺路线',
                href: '/technique-index',
            },
            {
                title: '一次合格率',
                href: '/standard',
            },
            {
                title: '设备监控',
                href: '/device',
            },
            {
                title: '检验合格率',
                href: '/test',
            },
            {
                title: '温湿度控制',
                href: '/temper',
            }
        ],
    },
    {
        title: '异常处理及定位',
        href: '/problem',
        subMenu: [

            {
                title: '问题处理概况',
                href: '/problem',
            },
            {
                title: '问题定位及培训',
                href: '/problem-pos',
            },
            {
                title: '质量预警',
                href: '/quality',
            },
            // {
            //     title: '工艺预警',
            //     href: '/',
            // }
        ],
    },
    {
        title: '综合业务',
        href: '/business',
        subMenu: [
            {
                title: '总体架构',
                href: '/framework',
            },
            {
                title: '解决方案',
                href: '/solution',
            },
            {
                title: '厂家分布',
                href: '/company-pos',
            },
            // {
            //     title: '综合监控',
            //     href: '/',
            //     link: true
            // }
        ]
    }
]